import 'package:flutter_li_ke_jie/entity/app_goods.dart';

class AppGoodsList{
  List<AppGoods> appGoods=[];

  AppGoodsList({this.appGoods=const[]});

  AppGoodsList.fromJson(String key,Map<String, dynamic> json) {
    if (json[key] != null) {
      appGoods = <AppGoods>[];
      json[key].forEach((v) { appGoods.add(new AppGoods.fromJson(v)); });
    }

  }

  Map<String, dynamic> toJson(String key) {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.appGoods != null) {
      data[key] = this.appGoods.map((v) => v.toJson()).toList();
    }
    return data;
  }
}